package com.mjfeed.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @description 评价
 * @author zhaominglei
 * @date 2014年12月28日
 */
@Entity
@Table(name="feed_comment")
public class Comment extends BaseEntity implements Serializable {
	private static final long serialVersionUID = -815445273747751035L;
	private String content; //内容
	private String ip; //ip
	private Boolean isShow; //是否显示
	private Integer score; //分数
	private Member member; //会员
	private Product product; //商品
	private Order order; //订单
	
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	@Column(name="is_show" , columnDefinition="BIT")
	public Boolean getIsShow() {
		return isShow;
	}
	public void setIsShow(Boolean isShow) {
		this.isShow = isShow;
	}
	public Integer getScore() {
		return score;
	}
	public void setScore(Integer score) {
		this.score = score;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="member_id", updatable=false)
	public Member getMember() {
		return member;
	}
	public void setMember(Member member) {
		this.member = member;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="product_id", nullable=false, updatable=false)
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="order_id", nullable=false, updatable=false)
	public Order getOrder() {
		return order;
	}
	public void setOrder(Order order) {
		this.order = order;
	}
}
